﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using MVCAddressBook.Models.Entities;

namespace MVCAddressBook.Models.Interfaces
{
    public interface IUserService
    {
        /// <summary>
        /// 增加通讯录名单
        /// </summary>
        /// <param name="userinfo"></param>
        bool AddUser(UserInfo userinfo);

        /// <summary>
        /// 删除通讯录名单
        /// </summary>
        /// <param name="userinfo"></param>
        bool DelUser(int userId);

        /// <summary>
        /// 编辑通讯录信息
        /// </summary>
        /// <param name="userinfo"></param>
        bool EditUser(UserInfo userinfo);

        /// <summary>
        /// 判断通讯录名单是否已存在
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        bool IsExistUser(string Name);

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        IList<UserInfo> GetUserList();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        UserInfo GetUser(int UserId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="Name"></param>
        /// <returns></returns>
        UserInfo GetUser(string Name);
    }
}
